package com.youga.xuapplication.http;

import android.content.Context;

import com.youga.xuapplication.app.XuApplication;
import com.youga.xuapplication.model.User;

import net.cgsoft.widget.https.okhttp.BaseRequest;

import okhttp3.FormBody;

/**
 * Created by Youga on 2016/1/13.
 */
public class GsonRequest extends BaseRequest {

    public GsonRequest(Context context) {
        super(context);
    }

    @Override
    protected void appendHeader(FormBody.Builder formBuilder) {
        User user = XuApplication.application.getUser();
        if (user != null) {
            formBuilder.add("uid", String.valueOf(user.getUid()));
            formBuilder.add("uuid", user.getUuid());
        }
    }

    @Override
    protected void appendPageHeader(FormBody.Builder formBuilder) {

    }

    @Override
    protected void sendAlertCallback(Context context, String message) {

    }

}
